package com.base.service.COUPON.impl;

import com.base.mapper.couponmapper.CouponGoodsMapper;
import com.base.po.voip_coupon.CouponGoods;
import com.base.po.voip_coupon.CouponGoodsExample;
import com.base.service.COUPON.CouponGoodsService;
import com.base.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("couponGoodsService")
public class CouponGoodsServiceImpl implements CouponGoodsService {
    @Autowired
    private CouponGoodsMapper couponGoodsMapper;


    @Override
    public int countByExample(CouponGoodsExample example) {
        return couponGoodsMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(CouponGoodsExample example) {
        return couponGoodsMapper.deleteByExample(example);
    }

    @Override
    public int insert(CouponGoods record) {
        return couponGoodsMapper.insert(record);
    }

    @Override
    public int insertSelective(CouponGoods record) {
        return couponGoodsMapper.insertSelective(record);
    }

    @Override
    public List<CouponGoods> selectByExample(CouponGoodsExample example) {
        return couponGoodsMapper.selectByExample(example);
    }

    @Override
    public List<CouponGoods> selectAll(Page page, String parentId, String brandId) {
        return couponGoodsMapper.selectAll(page, parentId, brandId);
    }

    @Override
    public List<CouponGoods> selectAllDetail(Page page, String parentId, String brandId) {
        return couponGoodsMapper.selectAllDetail(page, parentId, brandId);
    }

    @Override
    public CouponGoods selectByPrimaryKey(String id) {
        return couponGoodsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(CouponGoods record, CouponGoodsExample example) {
        return couponGoodsMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(CouponGoods record, CouponGoodsExample example) {
        return couponGoodsMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(CouponGoods record) {
        return couponGoodsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int countAll(String parentId, String brandId) {
        return couponGoodsMapper.countAll(parentId, brandId);
    }
}
